<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Layout Example</title>
    <style>
        .container {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            padding: 10px;
        }
        .box {
            width: calc(50% - 20px); /* Adjust for the gap */
            height: 100px;
            border: 1px dashed black;
            box-sizing: border-box;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
        }
        .box:nth-child(3),
        .box:nth-child(4) {
            height: 200px;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="box">Box 1</div>
        <div class="box">Box 2</div>
        <div class="box">Box 3</div>
        <div class="box">Box 4</div>
    </div>
</body>
</html>